/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

@mixin ouiHeaderDarkTheme($backgroundColor) {
  background-color: $backgroundColor;
  border-bottom-color: lightOrDarkTheme($backgroundColor, $ouiHeaderBorderColor);

  .ouiHeaderLogo__text,
  .ouiHeaderLink,
  .ouiHeaderSectionItemButton {
    color: $ouiColorGhost;
  }

  .ouiHeaderLink-isActive {
    color: makeHighContrastColor($ouiColorPrimary, $backgroundColor);
  }

  .ouiHeaderSectionItem {
    &:after {
      background: lightOrDarkTheme($ouiColorDarkShade, $ouiColorLightestShade);
    }
  }

  .ouiHeaderLogo,
  .ouiHeaderLink,
  .ouiHeaderSectionItemButton {
    &:focus {
      background: shade($ouiColorPrimary, 50%);
    }
  }

  .ouiHeaderSectionItemButton__notification--badge {
    box-shadow: 0 0 0 1px $backgroundColor;
  }

  .ouiHeaderSectionItemButton__notification--dot {
    stroke: $backgroundColor;
  }
}


/* OUI -> EUI Aliases */
@mixin euiHeaderDarkTheme($backgroundColor) {
  background-color: $backgroundColor;
  border-bottom-color: lightOrDarkTheme($backgroundColor, $ouiHeaderBorderColor);

  .euiHeaderLogo__text,
  .euiHeaderLink,
  .euiHeaderSectionItemButton {
    color: $ouiColorGhost;
  }

  .euiHeaderLink-isActive {
    color: makeHighContrastColor($ouiColorPrimary, $backgroundColor);
  }

  .euiHeaderSectionItem {
    &:after {
      background: lightOrDarkTheme($ouiColorDarkShade, $ouiColorLightestShade);
    }
  }

  .euiHeaderLogo,
  .euiHeaderLink,
  .euiHeaderSectionItemButton {
    &:focus {
      background: shade($ouiColorPrimary, 50%);
    }
  }

  .euiHeaderSectionItemButton__notification--badge {
    box-shadow: 0 0 0 1px $backgroundColor;
  }

  .euiHeaderSectionItemButton__notification--dot {
    stroke: $backgroundColor;
  }
}
/* End of Aliases */
